import { defineStore } from 'pinia';
import { store } from '@/stores';

export const useSystemStore = defineStore('system', {
  state: () => {
    return { systemInfo: null };
  },
  getters: {
    getSystemInfo(): any {
      return this.systemInfo;
    },
  },
  actions: {
    setSystemInfo(info: any) {
      this.systemInfo = info;
    },
  },
});

// 需要在设置之外使用
export function useSystemStoreWidthOut() {
  return useSystemStore(store);
}
